<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
    <title>织梦付费可见插件</title>
    <link href="hidden/js/bootstrap.min.css" rel="stylesheet">
    <script src="hidden/js/jquery.min.js"></script>
    <script src="hidden/js/jquery.serializejson.min.js"></script>
    <script src="hidden/js/bootstrap.min.js"></script>
    <script src="hidden/js/layer.js"></script>
    <script src="hidden/js/common.js"></script>
    <style>
        #myTab li{
            width:25%;
            float:left;
            height:40px;
            list-style: none;
            margin: 0;
            padding: 0;
        }

        #myTab li img{
            float:left;
            height: 40px;
        }

        #myTab li a{
            color:white;
            text-align: center;
            position: relative;
            display: block;
            padding: 10px 15px;
        }

        .blue{
            background:#0f9af2;
        }
        .gray{
            background: #dfdfdf;
        }
        li.gray a{
            color:#252525 !important;
        }
        .tabPaneUl{
            width: 700px;
            margin: 0 auto;
            list-style: none;
        }

        .tabPaneUl li{
            height: 40px;
            line-height: 40px;
        }

    </style>
</head>
<body>
<div class="container-fluid">
    <h2>织梦付费可见插件 V<?php echo $ver;?></h2>
    <!-- Tab panes -->
    <div class="tab-content">
        <div role="tabpanel" class="tab-pane active" id="basic">
            <table class="table table-bordered">
                <tr>
                    <th>说明</th>
                </tr>
                <tr>
                    <td>《织梦付费可见插件》是六久阁发布的一款隐藏内容付费阅读插件。
                        <p>当前版本：<?php echo $ver?></p>
                        <p>使用步骤：</p>
                        <ul>
                            <li>1.请先安装好<a href="http://www.lol9.cn/dedecj/2039.html" target="_blank">织梦个人支付插件（Xorpay）</a>，确保可以正常使用该插件进行收款。</li>
                            <li>2.在模板内容页（例如article_article.htm）添加隐藏内容调用标签：<code>{dede:include file='plus/hidden.htm' /}</code>（一般添加在<code>{dede:field.body/}</code>的后面）</li>
                            <li>3.发布文章或修改文章时，点击“设置隐藏内容”，添加隐藏内容，并设置支付金额。</li>
                            <li>4.更新并生成文档HTML</li>
                            <li>5.在“模块”->“xorpay支付”->“<a href="xorpay.php?dopost=order">订单列表</a>”中查看和管理订单</li>
                        </ul>
                        <p><a target="_blank" href="http://www.lol9.cn/dedecj/hidden.html">详情参见</a></p>
                        <p><a class="btn btn-success" id="check-update" href="javascript:;" data-loading-text="正在检查..." >检查更新</a></p>
                    </td>
                </tr>
            </table>
            <h3>基本设置</h3>
            <form id="form1" action="" method="post" name="form1">
                <input type="hidden" name="dopost" value="save">
                <table class="table table-bordered">
                    <tr>
                        <th style="width: 200px;">允许通过订单号查看隐藏内容</th>
                        <td>
                            <select class="form-control" name="basic[hidden_orderno]" id="hidden_orderno">
                                <option value="1" <?php echo (isset($data['hidden_orderno']) && $data['hidden_orderno']==1) ? 'selected' : ''?>>是</option>
                                <option value="2" <?php echo (isset($data['hidden_orderno']) && $data['hidden_orderno']==2) ? 'selected' : ''?>>否</option>
                            </select>
                        </td>
                        <td>
							输入支付成功的订单号可查看隐藏内容
							<input type="hidden" name="info[hidden_orderno]" value="允许通过订单号查看隐藏内容" style="width:80%">
						</td>

                    </tr>
                    <tr>
                        <th>隐藏内容提示语</th>
                        <td>
                            <input name="basic[hidden_tip]" id="hidden_tip" type="text" value="<?php echo $data['hidden_tip']?>" class="form-control" />
                        </td>
                        <td>
                            [money]为支付金额
                            <input type="hidden" name="info[hidden_tip]" value="隐藏内容提示语" style="width:80%">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <button class="btn btn-primary center-block">保存</button>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
    <br>
    <h5 class="text-center">Powered by <a href="http://www.lol9.cn/"><span class="label label-primary">六久阁</span></a></h5>
    <br>
</div>
</body>
<script>
    $(function () {
        $("#sendemail").click(function () {
            $(this).button('loading');
            sendTestMail();
        });
    });

    function sendTestMail() {
        var email = $("#comment_email").val();
        if (!email){
            layer.msg('请先填写邮箱地址');
            $("#comment_email").focus();
            $("#sendemail").button('reset');
        }else{
            var url = 'comment.php';
            $.post(url, {'dopost':'sendmail','email':email},function (data) {
                if (data.code==1){
                    layer.msg(data.msg);
                    $("#sendemail").button('reset');
                }else{
                    layer.msg('邮件发送成功！');
                    $("#sendemail").button('reset');
                }
            },'json');
        }

    }
</script>
</html>
